#pragma once
#include "CEntity.h"
#include "Enemy.h"
#include "SDLTimer.h"

// T MUST be a derived class of Enemy.
template <class T>
class EnemySpawner : public CEntity
{
    public:
        EnemySpawner(int X, int Y);
        virtual void OnLoop();
        void spawnEnemy();
        void spawnEnemyAtFixedRate(int milliseconds);

    protected:
        int fixedRate;
    
    private:
        int X;
        int Y;
        SDLTimer * fixedRateTimer;
};

#include "EnemySpawner.hpp"